package com.campus.commons.utils;

import lombok.Data;

/**
 * 统一错误类  前面包含  后的值不包含
 * 1000-2000 系统级别错误
 * 4000-6000  前端的错。。。。
 * 7000-8000 缓存map错误
 */
public enum Error {
    System_E1R("1000", "系统错误"), //不是代码问题 Exception
    System("2000", "SQL执行异常"), //不是代码问题 Exception
    PARAMS_E3R("4000", "参数异常"),
    Operation_E1R("4010", "操作异常"),
    Operation_E2R("4020","违规操作"),
    File_E1R("4011", "无法读取该文件"),
    File_E2R("4021", "文件不存在"),
    Other_E1R("6000", "未知错误"),
    Map_E3R("7000", "map异常");


    private String code;
    private String msg;

    Error(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }


}

